package icefaces3_3.test.backingbeans.principal;

import java.io.Serializable;

import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

@ViewScoped
@ManagedBean(name="principal")
public class PrincipalMBean implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private boolean showPopup;

	@PostConstruct
	public void postContruct() {
		this.showPopup = false;
	}
	
	public String openPopup(){
		this.showPopup = true;
		return null;
	}
	
	public String closePopup(){
		this.showPopup = false;
		return null;
	}

	/// GETTERS Y SETTERS
	public boolean isShowPopup() {
		return showPopup;
	}

	public void setShowPopup(boolean showPopup) {
		this.showPopup = showPopup;
	}
}
